package org.redis.cluster.loadbalance.slot;

import java.util.concurrent.Callable;

import org.redis.cluster.config.ClientConfig;
import org.redis.cluster.redis.support.RedisSlaveProcessor;

public class SlotReplicateProcessor implements Callable<Boolean> {

	private ClientConfig source;
	private ClientConfig target;
	
	public SlotReplicateProcessor(ClientConfig source,ClientConfig target) {
		this.source=source;
		this.target=target;
	}
	
	@Override
	public Boolean call() throws Exception {
		return RedisSlaveProcessor.getInstance().slave(source, target, true);
	}

}